package generator

import (
	v1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"v8s-controller/internal"
)

var (
	NamespaceMeta = metav1.TypeMeta{
		Kind:       "Namespace",
		APIVersion: "v1",
	}
)

func generateNamespaces(name internal.Namespace) []*v1.Namespace {
	return []*v1.Namespace{
		{
			TypeMeta: NamespaceMeta,
			ObjectMeta: metav1.ObjectMeta{
				Name: string(name),
				Labels: map[string]string{
					projectLabel: string(name),
				},
			},
		},
	}
}
